﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace PTExpress.Models.Validation
{
    public class MinValueAttribute :ValidationAttribute
    {
        private readonly int _value;

        public MinValueAttribute(int value)
        {
            _value = value;
        }

        public override bool IsValid(object value)
        {
            return (int)value >= _value;
        }
    }
}